package org.base;

import java.util.Collection;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
@Named(value="tipoExpedienteController")
@ViewScoped
public class TipoExpedienteController extends AbstractController<TipoExpediente> {

    @Inject
    private ExpedienteController expedienteCollectionController;

    public TipoExpedienteController() {
        // Inform the Abstract parent controller of the concrete TipoExpediente?cap_first Entity
        super(TipoExpediente.class);
    }


    /**
     * Resets the "selected" attribute of any parent Entity controllers.
     */
    public void resetParents() {
    }

    /**
    * Sets the "items" attribute with a collection of Expediente entities that are retrieved from TipoExpediente?cap_first
     * and returns the navigation outcome.
     *
     * @return  navigation outcome for Expediente page
     */
    public String navigateExpedienteCollection() {
        if (this.getSelected() != null) {
            FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("Expediente_items", this.getSelected().getExpedienteCollection());
        }
        return "/expediente/index";
    }

    @Override
    public void setItems(Collection<TipoExpediente> items) {
        super.setItems(items); 
    }

    @Override
    public Collection<TipoExpediente> getItems() {
        return super.getItems(); 
    }
    
    
}
